import 'package:dk_flutter_base/src/ui/page/page_base_home.dart';
import 'package:dk_flutter_base/src/ui/widget/dk_bottom_app_bar.dart';
import 'package:dk_flutter_base/src/ui/widget/dk_tab_bar.dart';
import 'package:flutter/material.dart';

class TabBottomApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    List<Tab> tabs = List()
      ..add(Tab(
        icon: new Icon(Icons.directions_bike),
      ))
      ..add(Tab(
        icon: new Icon(Icons.directions_bike),
      ))
      ..add(Tab(
        icon: new Icon(Icons.directions_bike),
      ))
      ..add(Tab(
        icon: new Icon(Icons.directions_bike),
      ));
    BottomAppBarParam bottomBarParam =
        BottomAppBarParam.withTab(TabBarOption.withNoIndicator(
      tabs,
      selectedLabelColor: Colors.blue,
      unselectedLabelColor: Colors.red,
    ));
    BaseHomePageParam pageParam = BaseHomePageParam.withTabWidgets([
      Center(
        child: Text("home1"),
      ),
      Center(
        child: Text("home2"),
      ),
      Center(
        child: Text("home3"),
      ),
      Center(
        child: Text("home4"),
      ),
    ], bottomBarParam);
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
//      home: MyHomePage(title: 'Flutter Demo Home Page'),
      home: BaseHomePage.createByParam(pageParam),
    );
  }
}
